<template>
	<view class="common-list u-f animated fadeIn fast">
		<view class="common-list-l">
			<image :src="item.userpic" mode="widthFix" lazy-load></image>
		</view>
		<view class="common-list-r">
			<view class="u-f-ac u-f-jsb ">
				<view class="u-f-ac">
					{{item.username}}
					<tag-sex-age :sex="item.sex" :age="item.age"></tag-sex-age>
				</view>
				<view class="icon iconfont icon-zengjia"  @tap="guanzhu">关注</view>
			</view>
			<view class="index-list2">{{item.type!=="share"?item.title:item.shareTitle}}</view>
			<view class="index-list3 u-f-ajc">
	
				<!-- 图片 -->
				<template v-if="item.type == 'img' || item.type == 'video'">
					<image :src="item.titlepic" mode="widthFix" lazy-load></image>
				</template>
				<!-- 视频 -->
				<template v-if="item.type === 'video'">
					<view class="icon iconfont icon-bofang index-list-play"></view>
					<view class="index-list-playinfo">{{item.playNum}}次播放 {{item.long}}</view>
				</template>
	
				<template v-if="item.type === 'share'">
					<view class="common-list-share u-f-ac">
						<image :src="item.titlepic" mode="widthFix" lazy-load></image>
						<view class="">
							{{item.title}}
						</view>
					</view>
				</template>
	
			</view>
			<view class="u-f-ac u-f-jsb">
				<view>{{item.path}}</view>
				<view class="u-f-ac">
					<view class="icon iconfont icon-zhuanfa">{{item.shareNum}}</view>
					<view class="icon iconfont icon-pinglun1">{{item.commentNum}}</view>
					<view class="icon iconfont icon-dianzan1">{{item.commentNum}}</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import tagSexAge from './tag-sex-age.vue';
	export default {
		components:{
			tagSexAge
		},
		props:{
			item:Object,
			index:Number
		},
		methods:{
			//关注
			guanzhu(){
				this.item.isguanzhu = true;
				uni.showToast({
					title:"关注成功",
					icon:"success"
				});
			},
		}
	}
</script>

<style scoped>
@import "../../common/list.css";
</style>
